﻿<view:OnlineObjectView x:Class="Reader.View.ContentView"
                         xmlns:view="clr-namespace:Reader.View"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" Loaded="UserControl_Loaded">    
    <StackPanel>
        <TextBlock Name="bookName" HorizontalAlignment="Center" FontSize="16"></TextBlock>
        <TextBlock Name="authorName" HorizontalAlignment="Center" FontSize="16"></TextBlock>
        <HyperlinkButton x:Name="bookPage" FontSize="16" Visibility="Collapsed" Content="返回书页" HorizontalAlignment="Center" VerticalAlignment="Center" Click="bookPage_Click" />

        <ListBox ItemsSource="{Binding}" HorizontalAlignment="Center" Name="listBox1" VerticalAlignment="Center">
            <ListBox.Template>
                <ControlTemplate>
                        <controlsToolkit:WrapPanel>
                            <ItemsPresenter  HorizontalAlignment="Center" VerticalAlignment="Center">
                            </ItemsPresenter>
                        </controlsToolkit:WrapPanel>
                </ControlTemplate>
            </ListBox.Template>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <controlsToolkit:WrapPanel FlowDirection="LeftToRight"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <HyperlinkButton  Width="300" CommandParameter="{Binding Uri}"  Content="{Binding Name}" Click="HyperlinkButton_Click" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <TextBlock Foreground="SpringGreen" Visibility="Collapsed"  Name="vip" HorizontalAlignment="Center" FontSize="16">Vip章节列表</TextBlock>
        <ListBox Background="SpringGreen"  ItemsSource="{Binding}" HorizontalAlignment="Center" Name="vipChapters" VerticalAlignment="Center" >
            <ListBox.Template>
                <ControlTemplate>
                    <controlsToolkit:WrapPanel>
                        <ItemsPresenter  HorizontalAlignment="Center" VerticalAlignment="Center">
                        </ItemsPresenter>
                    </controlsToolkit:WrapPanel>
                </ControlTemplate>
            </ListBox.Template>
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <controlsToolkit:WrapPanel FlowDirection="LeftToRight"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    
                    <TextBlock  Width="300" Text="{Binding Name}" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="14" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

    </StackPanel>
</view:OnlineObjectView>
